﻿
using SqlSugar;
using System.IO.Ports;

namespace Service.src.NW.Model.Drive
{

    /// <summary>
    ///  
    /// </summary>
    [SugarTable("sys_device")] 
    public class SysDevicrInfo : BaseDeviceEntity
    {

        /// <summary>
        /// 设备名称
        /// </summary>
        [SugarColumn(ColumnName = "device_name")]
        public string DeviceName { get; set; }

        /// <summary>
        /// 设备槽号
        /// </summary>
        [SugarColumn(ColumnName = "device_slot")]
        public int Slot { get; set; }

        /// <summary>
        /// 设备机架号 ，通常为 0
        /// </summary>
        [SugarColumn(ColumnName = "device_rack")]
        public string Rack { get; set; }

        /// <summary>
        /// 设备类型
        /// </summary>
        [SugarColumn(ColumnName = "device_type")]
        public string DeviceType { get; set; }

        /// <summary>
        /// 设备型号
        /// </summary>
        [SugarColumn(ColumnName = "device_model")]
        public string DeviceModel { get; set; }

        /// <summary>
        /// 接收超时时间
        /// </summary>
        [SugarColumn(ColumnName = "receive_timeout")]
        public int ReceiveTimeout { get; set; }

        /// <summary>
        /// 发送超时时间
        /// </summary>
        [SugarColumn(ColumnName = "send_timeout")]
        public int SendTimeout { get; set; }

        /// <summary>
        /// 连接字符串
        /// </summary>
        [SugarColumn(ColumnName = "connection_string")]
        public string ConnectionString { get; set; }

        /// <summary>
        /// 串口设备属性：波特率
        /// </summary>
        [SugarColumn(ColumnName = "baud_rate")]
        public int baudRate { get; set; }

        /// <summary>
        /// 串口设备属性：校验位
        /// </summary>
        [SugarColumn(ColumnName = "parity")]
        public Parity parity { get; set; }

        /// <summary>
        /// 串口设备属性：数据位
        /// </summary>
        [SugarColumn(ColumnName = "data_bits")]
        public int dataBits { get; set; }

        /// <summary>
        /// 串口设备属性：停止位
        /// </summary>
        [SugarColumn(ColumnName = "stop_bits")]
        public StopBits stopBits { get; set; }

        /// <summary>
        /// 数据流的结束字符，串口，scoket等
        /// </summary>
        [SugarColumn(ColumnName= "rerminator")]
        public string Rerminator { get; set; }

        public SysDevicrInfo() { }
    }
}
